﻿
using System;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Abp.Application.Services.Dto;
using Abp.Extensions;
using KDS.Mes.Mes.Factorys;

namespace KDS.Mes.Mes.BasicFactorys.EntityMapper.BasicFactorys
{

	/// <summary>
    /// 工厂信息的数据配置文件
    /// </summary>
    public class BasicFactoryCfg : EntityTypeConfiguration<Factory>
    {
		/// <summary>
        ///  构造方法[默认链接字符串< see cref = "MesDbContext" /> ]
        /// </summary>
		public BasicFactoryCfg ()
		{
		            ToTable("Factory", MesConsts.SchemaName.Basic);
 
      //todo: 需要将以下文件注入到MesDbContext中

  //		public IDbSet<BasicFactory> BasicFactorys { get; set; }
   //		 modelBuilder.Configurations.Add(new BasicFactoryCfg());




		    // 工厂名称
			Property(a => a.FactoryName).HasMaxLength(20);
		    // 工厂代码
			Property(a => a.FactoryCode).HasMaxLength(20);
		}
    }
}